package com.qingyun.modular.model;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import java.io.Serializable;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author 广西利码优信息科技有限公司
 * @since 2021-05-07
 */
public class Orders extends Model<Orders> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Integer id;
    /**
     * 提交的用户ID
     */
	@TableField("user_id")
	private Integer userId;
    /**
     * 生成的订单号
     */
	@TableField("order_no")
	private Long orderNo;
    /**
     * 订单状态
     */
	@TableField("order_status")
	private Integer orderStatus;
    /**
     * 支付金额
     */
	private Float price;
    /**
     * 支付方式。【1】微信支付，【2】支付宝，【3】小程序支付
     */
	@TableField("pay_type")
	private Integer payType;
    /**
     * 商品id
     */
	@TableField("goods_id")
	private Integer goodsID;
    /**
     * 支付用户的openid
     */
	private String openid;
    /**
     * 第三方支付平台返回的订单号
     */
	@TableField("transaction_id")
	private String transactionId;
    /**
     * 是否已经支付，【1】已支付
     */
	@TableField("is_pay")
	private Integer isPay;
    /**
     * 支付时间
     */
	@TableField("pay_succ_at")
	private Date paySuccAt;
	/**
	 * 订单创建时间
	 */
	@TableField("created_at")
	private Date createdAt;
	/**
	 * 订单修改时间
	 */
	@TableField("updated_at")
	private Date updatedAt;

	/**
	 * 结算类型
	 */
	@TableField("settlement_status")
	private Integer settlementStatus;
	/**
	 * 订单修改时间
	 */
	@TableField("settlement_at")
	private Date settlementAt;



	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Long getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(Long orderNo) {
		this.orderNo = orderNo;
	}


	public Float getPrice() {
		return price;
	}

	public void setPrice(Float price) {
		this.price = price;
	}

	public Integer getPayType() {
		return payType;
	}

	public void setPayType(Integer payType) {
		this.payType = payType;
	}


	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

	public String getTransactionId() {
		return transactionId;
	}

	public void setTransactionId(String transactionId) {
		this.transactionId = transactionId;
	}

	public Integer getIsPay() {
		return isPay;
	}

	public void setIsPay(Integer isPay) {
		this.isPay = isPay;
	}

	public Date getPaySuccAt() {
		return paySuccAt;
	}

	public void setPaySuccAt(Date paySuccAt) {
		this.paySuccAt = paySuccAt;
	}

	public Date getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	public Date getUpdatedAt() {
		return updatedAt;
	}

	public void setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getOrderStatus() {
		return orderStatus;
	}

	public void setOrderStatus(Integer orderStatus) {
		this.orderStatus = orderStatus;
	}

	public Integer getGoodsID() {
		return goodsID;
	}

	public void setGoodsID(Integer goodsID) {
		this.goodsID = goodsID;
	}

	public Integer getSettlementStatus() {
		return settlementStatus;
	}

	public void setSettlementStatus(Integer settlementStatus) {
		this.settlementStatus = settlementStatus;
	}

	public Date getSettlementAt() {
		return settlementAt;
	}

	public void setSettlementAt(Date settlementAt) {
		this.settlementAt = settlementAt;
	}

	@Override
	public String toString() {
		return "Orders{" +
				"id=" + id +
				", userId=" + userId +
				", orderNo=" + orderNo +
				", orderStatus=" + orderStatus +
				", price=" + price +
				", payType=" + payType +
				", goodsID=" + goodsID +
				", openid='" + openid + '\'' +
				", transactionId='" + transactionId + '\'' +
				", isPay=" + isPay +
				", paySuccAt=" + paySuccAt +
				", createdAt=" + createdAt +
				", updatedAt=" + updatedAt +
				", settlementStatus=" + settlementStatus +
				", settlementAt=" + settlementAt +
				'}';
	}
}
